# -*- coding: utf-8 -*-
"""
# @created on : 9月 2021/9/26 10:26
# @author     : kevin
# @file       : num.py
# @software   : PyCharm
# @project    : auto_keyword_data


@license: (C) Copyright 2019-2025, Corporation Limited.
@desc:
"""
import random
import time
import string


class CreatNum:
    def __init__(self):
        self.today = str(time.strftime('%Y%m%d'))
        self.current_time = str(time.strftime('%Y%m%d%H%M%S'))

    def creat_random_string(self, lent):
        """
        根据传入的位数，在当前年月日时分秒的基础上增加相应位的随机数并返回串
        :param lent: 字符串长度
        :return:
        """
        return self.current_time + ''.join(random.sample(string.ascii_letters + string.digits, int(lent)))

